package priv.lirenhe.dissertation.service.impl;

import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class Test {
	public static void main(String[] args) throws ParseException {
		ApplicationContext ac = new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml","mybatis-config.xml"});
		WebUrlServiceImpl webUrlServiceImpl = null;
		webUrlServiceImpl = (WebUrlServiceImpl) ac.getBean("WebUrlServiceImpl");
		
		Map<String,Map<String,String>> map = new HashMap<String,Map<String,String>>();
		
		Map<String,String> fieldMap = new HashMap<String,String>();
		
		fieldMap.put("webUrlRealurl","http://lianghui.people.com.cn/2018npc/n1/2018/0318/c418607-29874019.html");
		fieldMap.put("webUrlMainfatherurl","http://www.people.com.cn/");
		fieldMap.put("webUrlFatherurl","http://www.people.com.cn/");
		fieldMap.put("webUrlEffective","effective");
		fieldMap.put("webUrlHasused","hasUsed");
		fieldMap.put("webUrlUsenumber","1");
		fieldMap.put("webUrlFirstusetimestamp","2018-2-16 20:38:30");
		fieldMap.put("webUrlLastusetimestamp","2018-2-16 20:38:30");
		fieldMap.put("webUrlNoteffectivetimestamp","2018-2-16 20:38:30");
		
		map.put("http://lianghui.people.com.cn/2018npc/n1/2018/0318/c417507-29874144.html", fieldMap);
		
		
		webUrlServiceImpl.insertUrlSelective(map);
	
	}
}
